<? 
defined('_JEXEC') or die('Доступ ограничен!'); 
?>

<form action="index.php" method="post" name="adminForm" id="coupon-form">
<div class="col100">
    <fieldset class="adminform">
        <legend><?php echo JText::_( 'Details' ); ?></legend>
        <table class="admintable">
            <? foreach($this->form->getFieldset('default') as $field) { ?>
                <? if($this->isNew && ( $field->name == 'jform[uniqueCode]' || $field->name == 'jform[restCount]') ) continue; ?>
                <tr>
                    <td width='100' align='right' class='key'><? echo $field->label; ?></td>
                    <td>
                        <? if($field->name=='jform[uniqueCode]') {
                            $link = JRoute::_( 'index.php?option=com_coupons&controller=coupons&view=codes&cid[]='.$this->item->id); ?>
                                <a href="<? echo $link; ?>"><? echo JText::_('COM_COUPONS_VIEW_CODES'); ?></a>
                         <? } else
                                echo $field->input; 
                        ?></td>
                </tr>
            <? } ?>
        </table>
    </fieldset>
</div>

<div class="clr"></div>

<input type="hidden" name="option" value="com_coupons" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="id" value="<? echo $this->item->id; ?>" />
<input type="hidden" name="controller" value="coupons" />
</form>